package oop1;

/**
 * @author oldliu
 * @since 1.0
 */
public class PhoneTest {
    public static void main(String[] args) {
        MobilePhone m=new MobilePhone();
        m.color="金黄";
        m.brand="爱疯13";
        m.price=7999;
        System.out.println("dianchi :"+m.b);
        //1--------b一定要new过了
//        m.b.brand="iphong原装电池";
//        m.b.vol=10000;

        Battery bat=new Battery();
        bat.brand="飞毛腿散装电池";
        bat.vol=2000;
        //安装
        m.b=bat;//!!!!!@
        m.show();
    }
}
